export interface mock {
  code: number;
  msg: string;
}

export interface userInfo {
  id: number;
  name: string;
  address: string;
  sex: string;
}

export interface mockList extends mock {
  data: {
    total: number;
    list: Array<userInfo>;
  };
}

export default (): mockList => ({
  code: 1,
  msg: 'ok',
  data: {
    total: 120,
    list: Array(10)
      .fill(null)
      .map((item, idx) => ({
        id: idx,
        name: '张三' + idx,
        address: '北京市通州区龙江家园1号楼' + idx + '号',
        sex: idx & 1 ? '男' : '女',
      })),
  },
});
